﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using System.ComponentModel;

namespace anael.Model
{
    public class User : INotifyPropertyChanged
    {
        public string Id { get; set; }
        public string Name { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Link { get; set; }
        public string Gender { get; set; }
        public string Email { get; set; }
        public string TimeZone { get; set; }
        public string Localed { get; set; }
        public bool Verified { get; set; }
        public string UpdatedTime { get; set; }

        private List<Friend> friends;
        public List<Friend> Friends
        {
            get
            {
                return friends;
            }
            set
            {
                if (value != friends)
                {
                    friends = value;
                    NotifyPropertyChanged("Friends");
                }
            }
        }
        public int NumberOfFriends
        {
            get
            {
                if (Friends != null)
                {
                    return Friends.Count;
                }
                else
                {
                    return 0;
                }
            }
        }



        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(String info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
        #endregion
    }
}
